package entity;

/**
 * Student entity.
 * 
 * @author huiwensong.2012, huangjm.2012, mohameds.2012, sheryl.tay.2012
 * 
 */
public class Student {
	private String userId;
	private String password;
	private String name;
	private String school;
	private double edollar;

	public Student(String userId, String password, String name, String school,
			double edollar) {
		this.userId = userId;
		this.password = password;
		this.name = name;
		this.school = school;
		this.edollar = edollar;
	}

	public String getUserId() {
		return userId;
	}

	public String getPassword() {
		return password;
	}

	public String getName() {
		return name;
	}

	public double getEdollar() {
		return edollar;
	}

	public void setEdollar(double edollar) {
		this.edollar = edollar;
	}

	public String getSchool() {
		return school;
	}

	@Override
	public String toString() {
		return "Student [userId=" + userId + ", password=" + password
				+ ", name=" + name + ", school=" + school + ", edollar="
				+ edollar + "]";
	}

	@Override
	public boolean equals(Object obj) {
			if (obj instanceof Student) { 
				Student anotherObj = (Student)obj;
				return userId.equals(anotherObj.getUserId()); 
			}
		return false;
	}
	
	

}
